Optimal. Leaf size=76 \[ -\frac{a \sin ^3(c+d x)}{3 d}+\frac{a \sin (c+d x)}{d}+\frac{b \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac{3 b \sin (c+d x) \cos (c+d x)}{8 d}+\frac{3 b x}{8} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0586476, antiderivative size = 76, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.21, Rules used = {2748, 2633, 2635, 8} \[ -\frac{a \sin ^3(c+d x)}{3 d}+\frac{a \sin (c+d x)}{d}+\frac{b \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac{3 b \sin (c+d x) \cos (c+d x)}{8 d}+\frac{3 b x}{8} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2748
Rule 2633
Rule 2635
Rule 8
Rubi steps
\begin{align*} \int \cos ^3(c+d x) (a+b \cos (c+d x)) \, dx &=a \int \cos ^3(c+d x) \, dx+b \int \cos ^4(c+d x) \, dx\\ &=\frac{b \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac{1}{4} (3 b) \int \cos ^2(c+d x) \, dx-\frac{a \operatorname{Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=\frac{a \sin (c+d x)}{d}+\frac{3 b \cos (c+d x) \sin (c+d x)}{8 d}+\frac{b \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac{a \sin ^3(c+d x)}{3 d}+\frac{1}{8} (3 b) \int 1 \, dx\\ &=\frac{3 b x}{8}+\frac{a \sin (c+d x)}{d}+\frac{3 b \cos (c+d x) \sin (c+d x)}{8 d}+\frac{b \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac{a \sin ^3(c+d x)}{3 d}\\ \end{align*}
Mathematica [A] time = 0.0966939, size = 73, normalized size = 0.96 \[ -\frac{a \sin ^3(c+d x)}{3 d}+\frac{a \sin (c+d x)}{d}+\frac{3 b (c+d x)}{8 d}+\frac{b \sin (2 (c+d x))}{4 d}+\frac{b \sin (4 (c+d x))}{32 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.033, size = 60, normalized size = 0.8 \begin{align*}{\frac{1}{d} \left ( b \left ({\frac{\sin \left ( dx+c \right ) }{4} \left ( \left ( \cos \left ( dx+c \right ) \right ) ^{3}+{\frac{3\,\cos \left ( dx+c \right ) }{2}} \right ) }+{\frac{3\,dx}{8}}+{\frac{3\,c}{8}} \right ) +{\frac{a \left ( 2+ \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) }{3}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.954641, size = 77, normalized size = 1.01 \begin{align*} -\frac{32 \,{\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a - 3 \,{\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} b}{96 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.8701, size = 136, normalized size = 1.79 \begin{align*} \frac{9 \, b d x +{\left (6 \, b \cos \left (d x + c\right )^{3} + 8 \, a \cos \left (d x + c\right )^{2} + 9 \, b \cos \left (d x + c\right ) + 16 \, a\right )} \sin \left (d x + c\right )}{24 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.18761, size = 144, normalized size = 1.89 \begin{align*} \begin{cases} \frac{2 a \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac{a \sin{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac{3 b x \sin ^{4}{\left (c + d x \right )}}{8} + \frac{3 b x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac{3 b x \cos ^{4}{\left (c + d x \right )}}{8} + \frac{3 b \sin ^{3}{\left (c + d x \right )} \cos{\left (c + d x \right )}}{8 d} + \frac{5 b \sin{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} & \text{for}\: d \neq 0 \\x \left (a + b \cos{\left (c \right )}\right ) \cos ^{3}{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.32354, size = 84, normalized size = 1.11 \begin{align*} \frac{3}{8} \, b x + \frac{b \sin \left (4 \, d x + 4 \, c\right )}{32 \, d} + \frac{a \sin \left (3 \, d x + 3 \, c\right )}{12 \, d} + \frac{b \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} + \frac{3 \, a \sin \left (d x + c\right )}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]